﻿//Alejandro López Reyes

using System;

namespace DamCommander
{
    class Enhanced_Console
    {
        public void Write(int x, int y, string text, string color)
        {
            Console.SetCursorPosition(x, y);

            switch (color.ToLower())
            {
                case "yellow":
                    Console.ForegroundColor = ConsoleColor.Yellow;
                    ; break;

                case "red": 
                    Console.ForegroundColor = ConsoleColor.Red;
                    ; break;
                    

                case "blue":
                    Console.ForegroundColor = ConsoleColor.Blue;
                    ; break;

                case "cyan":
                    Console.ForegroundColor = ConsoleColor.Cyan;
                    ; break;

                case "black":
                    Console.ForegroundColor = ConsoleColor.Black;
                    ; break;

                case "white":
                    Console.ForegroundColor = ConsoleColor.White;
                    ; break;

                case "gray":
                    Console.ForegroundColor = ConsoleColor.Gray;
                    ; break;

                case "green":
                    Console.ForegroundColor = ConsoleColor.Green;
                    ; break;

                case "magenta":
                    Console.ForegroundColor = ConsoleColor.Magenta;
                    ; break;

                case "darkblue":
                    Console.ForegroundColor = ConsoleColor.DarkBlue;
                    ; break;

                case "darkcyan":
                    Console.ForegroundColor = ConsoleColor.DarkCyan;
                    ; break;

                case "darkgray":
                    Console.ForegroundColor = ConsoleColor.DarkGray;
                    ; break;

                case "darkgreen":
                    Console.ForegroundColor = ConsoleColor.DarkGreen;
                    ; break;

                case "darkmagenta":
                    Console.ForegroundColor = ConsoleColor.DarkMagenta;
                    ; break;

                case "darkred":
                    Console.ForegroundColor = ConsoleColor.DarkRed;
                    ; break;

                case "darkyellow":
                    Console.ForegroundColor = ConsoleColor.DarkYellow;
                    ; break;
            }

            Console.Write(text);

            Console.ResetColor();
      
        }
    }
}
